using System.Collections.Generic;

namespace Tool.PEPhysx
{
    public class EnvColliders
    {
        public List<ColliderConfig> colliderConfigs;

        List<PEColliderBase> envColliders = new List<PEColliderBase>();

        public void Init() 
        {
            for(int i = 0; i < colliderConfigs.Count; i++) {
                ColliderConfig cfg = colliderConfigs[i];
                if(cfg.mType == ColliderType.Box) {
                    envColliders.Add(new PEBoxCollider(cfg));
                }
                else if(cfg.mType == ColliderType.Cylinder) {
                    envColliders.Add(new PECylinderCollider(cfg));
                }
                else {
                    //其他类型的碰撞体
                }
            }
        }

        public List<PEColliderBase> GetEnvColliders() => envColliders;
    }
}

